package cn.hdu.liang.generics;

class Manipulator<T> {
    private T obj;

    public Manipulator(T x) {
        obj = x;
    }

    public void manipulate() {
        //无法编译
        //obj.f();
    }
}


public class Manipulation {
    public static void main(String[] args) {
        HasF hf = new HasF();
        /*Manipulator<HasF> manipulator = new Manipulator<>(hf);
        manipulator.manipulate();*/
        Manipulator2<HasF> manipulator2 = new Manipulator2<>(hf);
        manipulator2.manipulate();
    }
}